package com.ruoyi.business.appuser.service;


import com.ruoyi.business.appuser.vo.AccessToken;
import com.ruoyi.business.appuser.vo.Code2Session;

/**
 * @author Tellsea
 * @date 2021/05/20
 */
public interface WeiXinService {

    /**
     * code换取openId
     * https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html
     *
     * @param code
     * @return
     */
    Code2Session code2Session(String code);

    /**
     * 接口调用凭据
     * https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html
     *
     * @return
     */
    AccessToken getAccessToken();

    void sendTemplateMessage(String openId, String msg);
}
